package com.woniuxy.cloud.ticket.ticketgateway.config;

import com.woniuxy.cloud.ticket.ticketgateway.JWTHelper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfig {

    @Value("${auth.jwt.sign-key}")
    private String signingKey;


    @Value("${auth.jwt.boss-sign-key}")
    private String bossSigningKey;

    @Bean
    public JWTHelper jwtHelper(){
        JWTHelper jwtHelper = new JWTHelper();
        jwtHelper.setSigningKey(signingKey);
        return jwtHelper;
    }

    @Bean
    public JWTHelper bossJwtHelper(){
        JWTHelper jwtHelper = new JWTHelper();
        jwtHelper.setSigningKey(bossSigningKey);
        return jwtHelper;
    }
}
